/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
import * as $protobuf from "protobufjs/minimal";

// Common aliases
const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

export const ougd = $root.ougd = (() => {

    /**
     * Namespace ougd.
     * @exports ougd
     * @namespace
     */
    const ougd = {};

    ougd.OugdContract = (function() {

        /**
         * Properties of an OugdContract.
         * @memberof ougd
         * @interface IOugdContract
         * @property {string|null} [id] OugdContract id
         * @property {number|null} [type] OugdContract type
         * @property {number|null} [version] OugdContract version
         * @property {string|null} [userId] OugdContract userId
         * @property {string|null} [token] OugdContract token
         * @property {number|null} [errorCode] OugdContract errorCode
         * @property {number|null} [visitor] OugdContract visitor
         * @property {number|Long|null} [apiTime] OugdContract apiTime
         * @property {ougd.OugdContract.ILoginContract|null} [login] OugdContract login
         * @property {ougd.OugdContract.ILogoutContract|null} [logout] OugdContract logout
         * @property {ougd.OugdContract.IEnterRoom|null} [enterRoom] OugdContract enterRoom
         * @property {ougd.OugdContract.IExitRoom|null} [exitRoom] OugdContract exitRoom
         * @property {ougd.OugdContract.ILiveCourseMsg|null} [liveCourseMsg] OugdContract liveCourseMsg
         * @property {ougd.OugdContract.IReconnectContract|null} [reconnectContract] OugdContract reconnectContract
         * @property {ougd.OugdContract.ILiveCoursePlayState|null} [liveCoursePlayState] OugdContract liveCoursePlayState
         * @property {ougd.OugdContract.ILiveCourseSignCount|null} [liveCourseSignCount] OugdContract liveCourseSignCount
         */

        /**
         * Constructs a new OugdContract.
         * @memberof ougd
         * @classdesc Represents an OugdContract.
         * @implements IOugdContract
         * @constructor
         * @param {ougd.IOugdContract=} [properties] Properties to set
         */
        function OugdContract(properties) {
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * OugdContract id.
         * @member {string} id
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.id = "";

        /**
         * OugdContract type.
         * @member {number} type
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.type = 0;

        /**
         * OugdContract version.
         * @member {number} version
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.version = 0;

        /**
         * OugdContract userId.
         * @member {string} userId
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.userId = "";

        /**
         * OugdContract token.
         * @member {string} token
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.token = "";

        /**
         * OugdContract errorCode.
         * @member {number} errorCode
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.errorCode = 0;

        /**
         * OugdContract visitor.
         * @member {number} visitor
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.visitor = 0;

        /**
         * OugdContract apiTime.
         * @member {number|Long} apiTime
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.apiTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * OugdContract login.
         * @member {ougd.OugdContract.ILoginContract|null|undefined} login
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.login = null;

        /**
         * OugdContract logout.
         * @member {ougd.OugdContract.ILogoutContract|null|undefined} logout
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.logout = null;

        /**
         * OugdContract enterRoom.
         * @member {ougd.OugdContract.IEnterRoom|null|undefined} enterRoom
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.enterRoom = null;

        /**
         * OugdContract exitRoom.
         * @member {ougd.OugdContract.IExitRoom|null|undefined} exitRoom
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.exitRoom = null;

        /**
         * OugdContract liveCourseMsg.
         * @member {ougd.OugdContract.ILiveCourseMsg|null|undefined} liveCourseMsg
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.liveCourseMsg = null;

        /**
         * OugdContract reconnectContract.
         * @member {ougd.OugdContract.IReconnectContract|null|undefined} reconnectContract
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.reconnectContract = null;

        /**
         * OugdContract liveCoursePlayState.
         * @member {ougd.OugdContract.ILiveCoursePlayState|null|undefined} liveCoursePlayState
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.liveCoursePlayState = null;

        /**
         * OugdContract liveCourseSignCount.
         * @member {ougd.OugdContract.ILiveCourseSignCount|null|undefined} liveCourseSignCount
         * @memberof ougd.OugdContract
         * @instance
         */
        OugdContract.prototype.liveCourseSignCount = null;

        /**
         * Creates a new OugdContract instance using the specified properties.
         * @function create
         * @memberof ougd.OugdContract
         * @static
         * @param {ougd.IOugdContract=} [properties] Properties to set
         * @returns {ougd.OugdContract} OugdContract instance
         */
        OugdContract.create = function create(properties) {
            return new OugdContract(properties);
        };

        /**
         * Encodes the specified OugdContract message. Does not implicitly {@link ougd.OugdContract.verify|verify} messages.
         * @function encode
         * @memberof ougd.OugdContract
         * @static
         * @param {ougd.IOugdContract} message OugdContract message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        OugdContract.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.id != null && message.hasOwnProperty("id"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
            if (message.type != null && message.hasOwnProperty("type"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type);
            if (message.version != null && message.hasOwnProperty("version"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.version);
            if (message.userId != null && message.hasOwnProperty("userId"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.userId);
            if (message.token != null && message.hasOwnProperty("token"))
                writer.uint32(/* id 5, wireType 2 =*/42).string(message.token);
            if (message.errorCode != null && message.hasOwnProperty("errorCode"))
                writer.uint32(/* id 6, wireType 0 =*/48).int32(message.errorCode);
            if (message.visitor != null && message.hasOwnProperty("visitor"))
                writer.uint32(/* id 7, wireType 0 =*/56).int32(message.visitor);
            if (message.apiTime != null && message.hasOwnProperty("apiTime"))
                writer.uint32(/* id 8, wireType 0 =*/64).int64(message.apiTime);
            if (message.login != null && message.hasOwnProperty("login"))
                $root.ougd.OugdContract.LoginContract.encode(message.login, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
            if (message.logout != null && message.hasOwnProperty("logout"))
                $root.ougd.OugdContract.LogoutContract.encode(message.logout, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
            if (message.enterRoom != null && message.hasOwnProperty("enterRoom"))
                $root.ougd.OugdContract.EnterRoom.encode(message.enterRoom, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
            if (message.exitRoom != null && message.hasOwnProperty("exitRoom"))
                $root.ougd.OugdContract.ExitRoom.encode(message.exitRoom, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
            if (message.liveCourseMsg != null && message.hasOwnProperty("liveCourseMsg"))
                $root.ougd.OugdContract.LiveCourseMsg.encode(message.liveCourseMsg, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
            if (message.reconnectContract != null && message.hasOwnProperty("reconnectContract"))
                $root.ougd.OugdContract.ReconnectContract.encode(message.reconnectContract, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
            if (message.liveCoursePlayState != null && message.hasOwnProperty("liveCoursePlayState"))
                $root.ougd.OugdContract.LiveCoursePlayState.encode(message.liveCoursePlayState, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim();
            if (message.liveCourseSignCount != null && message.hasOwnProperty("liveCourseSignCount"))
                $root.ougd.OugdContract.LiveCourseSignCount.encode(message.liveCourseSignCount, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified OugdContract message, length delimited. Does not implicitly {@link ougd.OugdContract.verify|verify} messages.
         * @function encodeDelimited
         * @memberof ougd.OugdContract
         * @static
         * @param {ougd.IOugdContract} message OugdContract message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        OugdContract.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an OugdContract message from the specified reader or buffer.
         * @function decode
         * @memberof ougd.OugdContract
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {ougd.OugdContract} OugdContract
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        OugdContract.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ougd.OugdContract();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.id = reader.string();
                    break;
                case 2:
                    message.type = reader.int32();
                    break;
                case 3:
                    message.version = reader.int32();
                    break;
                case 4:
                    message.userId = reader.string();
                    break;
                case 5:
                    message.token = reader.string();
                    break;
                case 6:
                    message.errorCode = reader.int32();
                    break;
                case 7:
                    message.visitor = reader.int32();
                    break;
                case 8:
                    message.apiTime = reader.int64();
                    break;
                case 11:
                    message.login = $root.ougd.OugdContract.LoginContract.decode(reader, reader.uint32());
                    break;
                case 12:
                    message.logout = $root.ougd.OugdContract.LogoutContract.decode(reader, reader.uint32());
                    break;
                case 13:
                    message.enterRoom = $root.ougd.OugdContract.EnterRoom.decode(reader, reader.uint32());
                    break;
                case 14:
                    message.exitRoom = $root.ougd.OugdContract.ExitRoom.decode(reader, reader.uint32());
                    break;
                case 15:
                    message.liveCourseMsg = $root.ougd.OugdContract.LiveCourseMsg.decode(reader, reader.uint32());
                    break;
                case 16:
                    message.reconnectContract = $root.ougd.OugdContract.ReconnectContract.decode(reader, reader.uint32());
                    break;
                case 100:
                    message.liveCoursePlayState = $root.ougd.OugdContract.LiveCoursePlayState.decode(reader, reader.uint32());
                    break;
                case 101:
                    message.liveCourseSignCount = $root.ougd.OugdContract.LiveCourseSignCount.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an OugdContract message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof ougd.OugdContract
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {ougd.OugdContract} OugdContract
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        OugdContract.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an OugdContract message.
         * @function verify
         * @memberof ougd.OugdContract
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        OugdContract.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.id != null && message.hasOwnProperty("id"))
                if (!$util.isString(message.id))
                    return "id: string expected";
            if (message.type != null && message.hasOwnProperty("type"))
                if (!$util.isInteger(message.type))
                    return "type: integer expected";
            if (message.version != null && message.hasOwnProperty("version"))
                if (!$util.isInteger(message.version))
                    return "version: integer expected";
            if (message.userId != null && message.hasOwnProperty("userId"))
                if (!$util.isString(message.userId))
                    return "userId: string expected";
            if (message.token != null && message.hasOwnProperty("token"))
                if (!$util.isString(message.token))
                    return "token: string expected";
            if (message.errorCode != null && message.hasOwnProperty("errorCode"))
                if (!$util.isInteger(message.errorCode))
                    return "errorCode: integer expected";
            if (message.visitor != null && message.hasOwnProperty("visitor"))
                if (!$util.isInteger(message.visitor))
                    return "visitor: integer expected";
            if (message.apiTime != null && message.hasOwnProperty("apiTime"))
                if (!$util.isInteger(message.apiTime) && !(message.apiTime && $util.isInteger(message.apiTime.low) && $util.isInteger(message.apiTime.high)))
                    return "apiTime: integer|Long expected";
            if (message.login != null && message.hasOwnProperty("login")) {
                let error = $root.ougd.OugdContract.LoginContract.verify(message.login);
                if (error)
                    return "login." + error;
            }
            if (message.logout != null && message.hasOwnProperty("logout")) {
                let error = $root.ougd.OugdContract.LogoutContract.verify(message.logout);
                if (error)
                    return "logout." + error;
            }
            if (message.enterRoom != null && message.hasOwnProperty("enterRoom")) {
                let error = $root.ougd.OugdContract.EnterRoom.verify(message.enterRoom);
                if (error)
                    return "enterRoom." + error;
            }
            if (message.exitRoom != null && message.hasOwnProperty("exitRoom")) {
                let error = $root.ougd.OugdContract.ExitRoom.verify(message.exitRoom);
                if (error)
                    return "exitRoom." + error;
            }
            if (message.liveCourseMsg != null && message.hasOwnProperty("liveCourseMsg")) {
                let error = $root.ougd.OugdContract.LiveCourseMsg.verify(message.liveCourseMsg);
                if (error)
                    return "liveCourseMsg." + error;
            }
            if (message.reconnectContract != null && message.hasOwnProperty("reconnectContract")) {
                let error = $root.ougd.OugdContract.ReconnectContract.verify(message.reconnectContract);
                if (error)
                    return "reconnectContract." + error;
            }
            if (message.liveCoursePlayState != null && message.hasOwnProperty("liveCoursePlayState")) {
                let error = $root.ougd.OugdContract.LiveCoursePlayState.verify(message.liveCoursePlayState);
                if (error)
                    return "liveCoursePlayState." + error;
            }
            if (message.liveCourseSignCount != null && message.hasOwnProperty("liveCourseSignCount")) {
                let error = $root.ougd.OugdContract.LiveCourseSignCount.verify(message.liveCourseSignCount);
                if (error)
                    return "liveCourseSignCount." + error;
            }
            return null;
        };

        /**
         * Creates an OugdContract message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof ougd.OugdContract
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {ougd.OugdContract} OugdContract
         */
        OugdContract.fromObject = function fromObject(object) {
            if (object instanceof $root.ougd.OugdContract)
                return object;
            let message = new $root.ougd.OugdContract();
            if (object.id != null)
                message.id = String(object.id);
            if (object.type != null)
                message.type = object.type | 0;
            if (object.version != null)
                message.version = object.version | 0;
            if (object.userId != null)
                message.userId = String(object.userId);
            if (object.token != null)
                message.token = String(object.token);
            if (object.errorCode != null)
                message.errorCode = object.errorCode | 0;
            if (object.visitor != null)
                message.visitor = object.visitor | 0;
            if (object.apiTime != null)
                if ($util.Long)
                    (message.apiTime = $util.Long.fromValue(object.apiTime)).unsigned = false;
                else if (typeof object.apiTime === "string")
                    message.apiTime = parseInt(object.apiTime, 10);
                else if (typeof object.apiTime === "number")
                    message.apiTime = object.apiTime;
                else if (typeof object.apiTime === "object")
                    message.apiTime = new $util.LongBits(object.apiTime.low >>> 0, object.apiTime.high >>> 0).toNumber();
            if (object.login != null) {
                if (typeof object.login !== "object")
                    throw TypeError(".ougd.OugdContract.login: object expected");
                message.login = $root.ougd.OugdContract.LoginContract.fromObject(object.login);
            }
            if (object.logout != null) {
                if (typeof object.logout !== "object")
                    throw TypeError(".ougd.OugdContract.logout: object expected");
                message.logout = $root.ougd.OugdContract.LogoutContract.fromObject(object.logout);
            }
            if (object.enterRoom != null) {
                if (typeof object.enterRoom !== "object")
                    throw TypeError(".ougd.OugdContract.enterRoom: object expected");
                message.enterRoom = $root.ougd.OugdContract.EnterRoom.fromObject(object.enterRoom);
            }
            if (object.exitRoom != null) {
                if (typeof object.exitRoom !== "object")
                    throw TypeError(".ougd.OugdContract.exitRoom: object expected");
                message.exitRoom = $root.ougd.OugdContract.ExitRoom.fromObject(object.exitRoom);
            }
            if (object.liveCourseMsg != null) {
                if (typeof object.liveCourseMsg !== "object")
                    throw TypeError(".ougd.OugdContract.liveCourseMsg: object expected");
                message.liveCourseMsg = $root.ougd.OugdContract.LiveCourseMsg.fromObject(object.liveCourseMsg);
            }
            if (object.reconnectContract != null) {
                if (typeof object.reconnectContract !== "object")
                    throw TypeError(".ougd.OugdContract.reconnectContract: object expected");
                message.reconnectContract = $root.ougd.OugdContract.ReconnectContract.fromObject(object.reconnectContract);
            }
            if (object.liveCoursePlayState != null) {
                if (typeof object.liveCoursePlayState !== "object")
                    throw TypeError(".ougd.OugdContract.liveCoursePlayState: object expected");
                message.liveCoursePlayState = $root.ougd.OugdContract.LiveCoursePlayState.fromObject(object.liveCoursePlayState);
            }
            if (object.liveCourseSignCount != null) {
                if (typeof object.liveCourseSignCount !== "object")
                    throw TypeError(".ougd.OugdContract.liveCourseSignCount: object expected");
                message.liveCourseSignCount = $root.ougd.OugdContract.LiveCourseSignCount.fromObject(object.liveCourseSignCount);
            }
            return message;
        };

        /**
         * Creates a plain object from an OugdContract message. Also converts values to other types if specified.
         * @function toObject
         * @memberof ougd.OugdContract
         * @static
         * @param {ougd.OugdContract} message OugdContract
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        OugdContract.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.defaults) {
                object.id = "";
                object.type = 0;
                object.version = 0;
                object.userId = "";
                object.token = "";
                object.errorCode = 0;
                object.visitor = 0;
                if ($util.Long) {
                    let long = new $util.Long(0, 0, false);
                    object.apiTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.apiTime = options.longs === String ? "0" : 0;
                object.login = null;
                object.logout = null;
                object.enterRoom = null;
                object.exitRoom = null;
                object.liveCourseMsg = null;
                object.reconnectContract = null;
                object.liveCoursePlayState = null;
                object.liveCourseSignCount = null;
            }
            if (message.id != null && message.hasOwnProperty("id"))
                object.id = message.id;
            if (message.type != null && message.hasOwnProperty("type"))
                object.type = message.type;
            if (message.version != null && message.hasOwnProperty("version"))
                object.version = message.version;
            if (message.userId != null && message.hasOwnProperty("userId"))
                object.userId = message.userId;
            if (message.token != null && message.hasOwnProperty("token"))
                object.token = message.token;
            if (message.errorCode != null && message.hasOwnProperty("errorCode"))
                object.errorCode = message.errorCode;
            if (message.visitor != null && message.hasOwnProperty("visitor"))
                object.visitor = message.visitor;
            if (message.apiTime != null && message.hasOwnProperty("apiTime"))
                if (typeof message.apiTime === "number")
                    object.apiTime = options.longs === String ? String(message.apiTime) : message.apiTime;
                else
                    object.apiTime = options.longs === String ? $util.Long.prototype.toString.call(message.apiTime) : options.longs === Number ? new $util.LongBits(message.apiTime.low >>> 0, message.apiTime.high >>> 0).toNumber() : message.apiTime;
            if (message.login != null && message.hasOwnProperty("login"))
                object.login = $root.ougd.OugdContract.LoginContract.toObject(message.login, options);
            if (message.logout != null && message.hasOwnProperty("logout"))
                object.logout = $root.ougd.OugdContract.LogoutContract.toObject(message.logout, options);
            if (message.enterRoom != null && message.hasOwnProperty("enterRoom"))
                object.enterRoom = $root.ougd.OugdContract.EnterRoom.toObject(message.enterRoom, options);
            if (message.exitRoom != null && message.hasOwnProperty("exitRoom"))
                object.exitRoom = $root.ougd.OugdContract.ExitRoom.toObject(message.exitRoom, options);
            if (message.liveCourseMsg != null && message.hasOwnProperty("liveCourseMsg"))
                object.liveCourseMsg = $root.ougd.OugdContract.LiveCourseMsg.toObject(message.liveCourseMsg, options);
            if (message.reconnectContract != null && message.hasOwnProperty("reconnectContract"))
                object.reconnectContract = $root.ougd.OugdContract.ReconnectContract.toObject(message.reconnectContract, options);
            if (message.liveCoursePlayState != null && message.hasOwnProperty("liveCoursePlayState"))
                object.liveCoursePlayState = $root.ougd.OugdContract.LiveCoursePlayState.toObject(message.liveCoursePlayState, options);
            if (message.liveCourseSignCount != null && message.hasOwnProperty("liveCourseSignCount"))
                object.liveCourseSignCount = $root.ougd.OugdContract.LiveCourseSignCount.toObject(message.liveCourseSignCount, options);
            return object;
        };

        /**
         * Converts this OugdContract to JSON.
         * @function toJSON
         * @memberof ougd.OugdContract
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        OugdContract.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        OugdContract.LoginContract = (function() {

            /**
             * Properties of a LoginContract.
             * @memberof ougd.OugdContract
             * @interface ILoginContract
             */

            /**
             * Constructs a new LoginContract.
             * @memberof ougd.OugdContract
             * @classdesc Represents a LoginContract.
             * @implements ILoginContract
             * @constructor
             * @param {ougd.OugdContract.ILoginContract=} [properties] Properties to set
             */
            function LoginContract(properties) {
                if (properties)
                    for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * Creates a new LoginContract instance using the specified properties.
             * @function create
             * @memberof ougd.OugdContract.LoginContract
             * @static
             * @param {ougd.OugdContract.ILoginContract=} [properties] Properties to set
             * @returns {ougd.OugdContract.LoginContract} LoginContract instance
             */
            LoginContract.create = function create(properties) {
                return new LoginContract(properties);
            };

            /**
             * Encodes the specified LoginContract message. Does not implicitly {@link ougd.OugdContract.LoginContract.verify|verify} messages.
             * @function encode
             * @memberof ougd.OugdContract.LoginContract
             * @static
             * @param {ougd.OugdContract.ILoginContract} message LoginContract message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LoginContract.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                return writer;
            };

            /**
             * Encodes the specified LoginContract message, length delimited. Does not implicitly {@link ougd.OugdContract.LoginContract.verify|verify} messages.
             * @function encodeDelimited
             * @memberof ougd.OugdContract.LoginContract
             * @static
             * @param {ougd.OugdContract.ILoginContract} message LoginContract message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LoginContract.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a LoginContract message from the specified reader or buffer.
             * @function decode
             * @memberof ougd.OugdContract.LoginContract
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {ougd.OugdContract.LoginContract} LoginContract
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LoginContract.decode = function decode(reader, length) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ougd.OugdContract.LoginContract();
                while (reader.pos < end) {
                    let tag = reader.uint32();
                    switch (tag >>> 3) {
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a LoginContract message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof ougd.OugdContract.LoginContract
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {ougd.OugdContract.LoginContract} LoginContract
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LoginContract.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a LoginContract message.
             * @function verify
             * @memberof ougd.OugdContract.LoginContract
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LoginContract.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a LoginContract message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof ougd.OugdContract.LoginContract
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {ougd.OugdContract.LoginContract} LoginContract
             */
            LoginContract.fromObject = function fromObject(object) {
                if (object instanceof $root.ougd.OugdContract.LoginContract)
                    return object;
                return new $root.ougd.OugdContract.LoginContract();
            };

            /**
             * Creates a plain object from a LoginContract message. Also converts values to other types if specified.
             * @function toObject
             * @memberof ougd.OugdContract.LoginContract
             * @static
             * @param {ougd.OugdContract.LoginContract} message LoginContract
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LoginContract.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this LoginContract to JSON.
             * @function toJSON
             * @memberof ougd.OugdContract.LoginContract
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            LoginContract.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            return LoginContract;
        })();

        OugdContract.LogoutContract = (function() {

            /**
             * Properties of a LogoutContract.
             * @memberof ougd.OugdContract
             * @interface ILogoutContract
             */

            /**
             * Constructs a new LogoutContract.
             * @memberof ougd.OugdContract
             * @classdesc Represents a LogoutContract.
             * @implements ILogoutContract
             * @constructor
             * @param {ougd.OugdContract.ILogoutContract=} [properties] Properties to set
             */
            function LogoutContract(properties) {
                if (properties)
                    for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * Creates a new LogoutContract instance using the specified properties.
             * @function create
             * @memberof ougd.OugdContract.LogoutContract
             * @static
             * @param {ougd.OugdContract.ILogoutContract=} [properties] Properties to set
             * @returns {ougd.OugdContract.LogoutContract} LogoutContract instance
             */
            LogoutContract.create = function create(properties) {
                return new LogoutContract(properties);
            };

            /**
             * Encodes the specified LogoutContract message. Does not implicitly {@link ougd.OugdContract.LogoutContract.verify|verify} messages.
             * @function encode
             * @memberof ougd.OugdContract.LogoutContract
             * @static
             * @param {ougd.OugdContract.ILogoutContract} message LogoutContract message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LogoutContract.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                return writer;
            };

            /**
             * Encodes the specified LogoutContract message, length delimited. Does not implicitly {@link ougd.OugdContract.LogoutContract.verify|verify} messages.
             * @function encodeDelimited
             * @memberof ougd.OugdContract.LogoutContract
             * @static
             * @param {ougd.OugdContract.ILogoutContract} message LogoutContract message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LogoutContract.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a LogoutContract message from the specified reader or buffer.
             * @function decode
             * @memberof ougd.OugdContract.LogoutContract
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {ougd.OugdContract.LogoutContract} LogoutContract
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LogoutContract.decode = function decode(reader, length) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ougd.OugdContract.LogoutContract();
                while (reader.pos < end) {
                    let tag = reader.uint32();
                    switch (tag >>> 3) {
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a LogoutContract message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof ougd.OugdContract.LogoutContract
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {ougd.OugdContract.LogoutContract} LogoutContract
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LogoutContract.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a LogoutContract message.
             * @function verify
             * @memberof ougd.OugdContract.LogoutContract
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LogoutContract.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a LogoutContract message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof ougd.OugdContract.LogoutContract
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {ougd.OugdContract.LogoutContract} LogoutContract
             */
            LogoutContract.fromObject = function fromObject(object) {
                if (object instanceof $root.ougd.OugdContract.LogoutContract)
                    return object;
                return new $root.ougd.OugdContract.LogoutContract();
            };

            /**
             * Creates a plain object from a LogoutContract message. Also converts values to other types if specified.
             * @function toObject
             * @memberof ougd.OugdContract.LogoutContract
             * @static
             * @param {ougd.OugdContract.LogoutContract} message LogoutContract
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LogoutContract.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this LogoutContract to JSON.
             * @function toJSON
             * @memberof ougd.OugdContract.LogoutContract
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            LogoutContract.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            return LogoutContract;
        })();

        OugdContract.ReconnectContract = (function() {

            /**
             * Properties of a ReconnectContract.
             * @memberof ougd.OugdContract
             * @interface IReconnectContract
             * @property {string|null} [liveCourseId] ReconnectContract liveCourseId
             */

            /**
             * Constructs a new ReconnectContract.
             * @memberof ougd.OugdContract
             * @classdesc Represents a ReconnectContract.
             * @implements IReconnectContract
             * @constructor
             * @param {ougd.OugdContract.IReconnectContract=} [properties] Properties to set
             */
            function ReconnectContract(properties) {
                if (properties)
                    for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * ReconnectContract liveCourseId.
             * @member {string} liveCourseId
             * @memberof ougd.OugdContract.ReconnectContract
             * @instance
             */
            ReconnectContract.prototype.liveCourseId = "";

            /**
             * Creates a new ReconnectContract instance using the specified properties.
             * @function create
             * @memberof ougd.OugdContract.ReconnectContract
             * @static
             * @param {ougd.OugdContract.IReconnectContract=} [properties] Properties to set
             * @returns {ougd.OugdContract.ReconnectContract} ReconnectContract instance
             */
            ReconnectContract.create = function create(properties) {
                return new ReconnectContract(properties);
            };

            /**
             * Encodes the specified ReconnectContract message. Does not implicitly {@link ougd.OugdContract.ReconnectContract.verify|verify} messages.
             * @function encode
             * @memberof ougd.OugdContract.ReconnectContract
             * @static
             * @param {ougd.OugdContract.IReconnectContract} message ReconnectContract message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ReconnectContract.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.liveCourseId);
                return writer;
            };

            /**
             * Encodes the specified ReconnectContract message, length delimited. Does not implicitly {@link ougd.OugdContract.ReconnectContract.verify|verify} messages.
             * @function encodeDelimited
             * @memberof ougd.OugdContract.ReconnectContract
             * @static
             * @param {ougd.OugdContract.IReconnectContract} message ReconnectContract message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ReconnectContract.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ReconnectContract message from the specified reader or buffer.
             * @function decode
             * @memberof ougd.OugdContract.ReconnectContract
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {ougd.OugdContract.ReconnectContract} ReconnectContract
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ReconnectContract.decode = function decode(reader, length) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ougd.OugdContract.ReconnectContract();
                while (reader.pos < end) {
                    let tag = reader.uint32();
                    switch (tag >>> 3) {
                    case 1:
                        message.liveCourseId = reader.string();
                        break;
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a ReconnectContract message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof ougd.OugdContract.ReconnectContract
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {ougd.OugdContract.ReconnectContract} ReconnectContract
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ReconnectContract.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ReconnectContract message.
             * @function verify
             * @memberof ougd.OugdContract.ReconnectContract
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ReconnectContract.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    if (!$util.isString(message.liveCourseId))
                        return "liveCourseId: string expected";
                return null;
            };

            /**
             * Creates a ReconnectContract message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof ougd.OugdContract.ReconnectContract
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {ougd.OugdContract.ReconnectContract} ReconnectContract
             */
            ReconnectContract.fromObject = function fromObject(object) {
                if (object instanceof $root.ougd.OugdContract.ReconnectContract)
                    return object;
                let message = new $root.ougd.OugdContract.ReconnectContract();
                if (object.liveCourseId != null)
                    message.liveCourseId = String(object.liveCourseId);
                return message;
            };

            /**
             * Creates a plain object from a ReconnectContract message. Also converts values to other types if specified.
             * @function toObject
             * @memberof ougd.OugdContract.ReconnectContract
             * @static
             * @param {ougd.OugdContract.ReconnectContract} message ReconnectContract
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ReconnectContract.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                let object = {};
                if (options.defaults)
                    object.liveCourseId = "";
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    object.liveCourseId = message.liveCourseId;
                return object;
            };

            /**
             * Converts this ReconnectContract to JSON.
             * @function toJSON
             * @memberof ougd.OugdContract.ReconnectContract
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ReconnectContract.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            return ReconnectContract;
        })();

        OugdContract.EnterRoom = (function() {

            /**
             * Properties of an EnterRoom.
             * @memberof ougd.OugdContract
             * @interface IEnterRoom
             * @property {string|null} [liveCourseId] EnterRoom liveCourseId
             */

            /**
             * Constructs a new EnterRoom.
             * @memberof ougd.OugdContract
             * @classdesc Represents an EnterRoom.
             * @implements IEnterRoom
             * @constructor
             * @param {ougd.OugdContract.IEnterRoom=} [properties] Properties to set
             */
            function EnterRoom(properties) {
                if (properties)
                    for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * EnterRoom liveCourseId.
             * @member {string} liveCourseId
             * @memberof ougd.OugdContract.EnterRoom
             * @instance
             */
            EnterRoom.prototype.liveCourseId = "";

            /**
             * Creates a new EnterRoom instance using the specified properties.
             * @function create
             * @memberof ougd.OugdContract.EnterRoom
             * @static
             * @param {ougd.OugdContract.IEnterRoom=} [properties] Properties to set
             * @returns {ougd.OugdContract.EnterRoom} EnterRoom instance
             */
            EnterRoom.create = function create(properties) {
                return new EnterRoom(properties);
            };

            /**
             * Encodes the specified EnterRoom message. Does not implicitly {@link ougd.OugdContract.EnterRoom.verify|verify} messages.
             * @function encode
             * @memberof ougd.OugdContract.EnterRoom
             * @static
             * @param {ougd.OugdContract.IEnterRoom} message EnterRoom message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnterRoom.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.liveCourseId);
                return writer;
            };

            /**
             * Encodes the specified EnterRoom message, length delimited. Does not implicitly {@link ougd.OugdContract.EnterRoom.verify|verify} messages.
             * @function encodeDelimited
             * @memberof ougd.OugdContract.EnterRoom
             * @static
             * @param {ougd.OugdContract.IEnterRoom} message EnterRoom message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnterRoom.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EnterRoom message from the specified reader or buffer.
             * @function decode
             * @memberof ougd.OugdContract.EnterRoom
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {ougd.OugdContract.EnterRoom} EnterRoom
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnterRoom.decode = function decode(reader, length) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ougd.OugdContract.EnterRoom();
                while (reader.pos < end) {
                    let tag = reader.uint32();
                    switch (tag >>> 3) {
                    case 1:
                        message.liveCourseId = reader.string();
                        break;
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an EnterRoom message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof ougd.OugdContract.EnterRoom
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {ougd.OugdContract.EnterRoom} EnterRoom
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnterRoom.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EnterRoom message.
             * @function verify
             * @memberof ougd.OugdContract.EnterRoom
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EnterRoom.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    if (!$util.isString(message.liveCourseId))
                        return "liveCourseId: string expected";
                return null;
            };

            /**
             * Creates an EnterRoom message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof ougd.OugdContract.EnterRoom
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {ougd.OugdContract.EnterRoom} EnterRoom
             */
            EnterRoom.fromObject = function fromObject(object) {
                if (object instanceof $root.ougd.OugdContract.EnterRoom)
                    return object;
                let message = new $root.ougd.OugdContract.EnterRoom();
                if (object.liveCourseId != null)
                    message.liveCourseId = String(object.liveCourseId);
                return message;
            };

            /**
             * Creates a plain object from an EnterRoom message. Also converts values to other types if specified.
             * @function toObject
             * @memberof ougd.OugdContract.EnterRoom
             * @static
             * @param {ougd.OugdContract.EnterRoom} message EnterRoom
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EnterRoom.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                let object = {};
                if (options.defaults)
                    object.liveCourseId = "";
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    object.liveCourseId = message.liveCourseId;
                return object;
            };

            /**
             * Converts this EnterRoom to JSON.
             * @function toJSON
             * @memberof ougd.OugdContract.EnterRoom
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EnterRoom.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            return EnterRoom;
        })();

        OugdContract.ExitRoom = (function() {

            /**
             * Properties of an ExitRoom.
             * @memberof ougd.OugdContract
             * @interface IExitRoom
             * @property {string|null} [liveCourseId] ExitRoom liveCourseId
             */

            /**
             * Constructs a new ExitRoom.
             * @memberof ougd.OugdContract
             * @classdesc Represents an ExitRoom.
             * @implements IExitRoom
             * @constructor
             * @param {ougd.OugdContract.IExitRoom=} [properties] Properties to set
             */
            function ExitRoom(properties) {
                if (properties)
                    for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * ExitRoom liveCourseId.
             * @member {string} liveCourseId
             * @memberof ougd.OugdContract.ExitRoom
             * @instance
             */
            ExitRoom.prototype.liveCourseId = "";

            /**
             * Creates a new ExitRoom instance using the specified properties.
             * @function create
             * @memberof ougd.OugdContract.ExitRoom
             * @static
             * @param {ougd.OugdContract.IExitRoom=} [properties] Properties to set
             * @returns {ougd.OugdContract.ExitRoom} ExitRoom instance
             */
            ExitRoom.create = function create(properties) {
                return new ExitRoom(properties);
            };

            /**
             * Encodes the specified ExitRoom message. Does not implicitly {@link ougd.OugdContract.ExitRoom.verify|verify} messages.
             * @function encode
             * @memberof ougd.OugdContract.ExitRoom
             * @static
             * @param {ougd.OugdContract.IExitRoom} message ExitRoom message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ExitRoom.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.liveCourseId);
                return writer;
            };

            /**
             * Encodes the specified ExitRoom message, length delimited. Does not implicitly {@link ougd.OugdContract.ExitRoom.verify|verify} messages.
             * @function encodeDelimited
             * @memberof ougd.OugdContract.ExitRoom
             * @static
             * @param {ougd.OugdContract.IExitRoom} message ExitRoom message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ExitRoom.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an ExitRoom message from the specified reader or buffer.
             * @function decode
             * @memberof ougd.OugdContract.ExitRoom
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {ougd.OugdContract.ExitRoom} ExitRoom
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ExitRoom.decode = function decode(reader, length) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ougd.OugdContract.ExitRoom();
                while (reader.pos < end) {
                    let tag = reader.uint32();
                    switch (tag >>> 3) {
                    case 1:
                        message.liveCourseId = reader.string();
                        break;
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an ExitRoom message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof ougd.OugdContract.ExitRoom
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {ougd.OugdContract.ExitRoom} ExitRoom
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ExitRoom.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an ExitRoom message.
             * @function verify
             * @memberof ougd.OugdContract.ExitRoom
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ExitRoom.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    if (!$util.isString(message.liveCourseId))
                        return "liveCourseId: string expected";
                return null;
            };

            /**
             * Creates an ExitRoom message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof ougd.OugdContract.ExitRoom
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {ougd.OugdContract.ExitRoom} ExitRoom
             */
            ExitRoom.fromObject = function fromObject(object) {
                if (object instanceof $root.ougd.OugdContract.ExitRoom)
                    return object;
                let message = new $root.ougd.OugdContract.ExitRoom();
                if (object.liveCourseId != null)
                    message.liveCourseId = String(object.liveCourseId);
                return message;
            };

            /**
             * Creates a plain object from an ExitRoom message. Also converts values to other types if specified.
             * @function toObject
             * @memberof ougd.OugdContract.ExitRoom
             * @static
             * @param {ougd.OugdContract.ExitRoom} message ExitRoom
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ExitRoom.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                let object = {};
                if (options.defaults)
                    object.liveCourseId = "";
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    object.liveCourseId = message.liveCourseId;
                return object;
            };

            /**
             * Converts this ExitRoom to JSON.
             * @function toJSON
             * @memberof ougd.OugdContract.ExitRoom
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ExitRoom.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            return ExitRoom;
        })();

        OugdContract.LiveCourseMsg = (function() {

            /**
             * Properties of a LiveCourseMsg.
             * @memberof ougd.OugdContract
             * @interface ILiveCourseMsg
             * @property {string|null} [liveCourseId] LiveCourseMsg liveCourseId
             * @property {string|null} [content] LiveCourseMsg content
             * @property {string|null} [nickName] LiveCourseMsg nickName
             */

            /**
             * Constructs a new LiveCourseMsg.
             * @memberof ougd.OugdContract
             * @classdesc Represents a LiveCourseMsg.
             * @implements ILiveCourseMsg
             * @constructor
             * @param {ougd.OugdContract.ILiveCourseMsg=} [properties] Properties to set
             */
            function LiveCourseMsg(properties) {
                if (properties)
                    for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * LiveCourseMsg liveCourseId.
             * @member {string} liveCourseId
             * @memberof ougd.OugdContract.LiveCourseMsg
             * @instance
             */
            LiveCourseMsg.prototype.liveCourseId = "";

            /**
             * LiveCourseMsg content.
             * @member {string} content
             * @memberof ougd.OugdContract.LiveCourseMsg
             * @instance
             */
            LiveCourseMsg.prototype.content = "";

            /**
             * LiveCourseMsg nickName.
             * @member {string} nickName
             * @memberof ougd.OugdContract.LiveCourseMsg
             * @instance
             */
            LiveCourseMsg.prototype.nickName = "";

            /**
             * Creates a new LiveCourseMsg instance using the specified properties.
             * @function create
             * @memberof ougd.OugdContract.LiveCourseMsg
             * @static
             * @param {ougd.OugdContract.ILiveCourseMsg=} [properties] Properties to set
             * @returns {ougd.OugdContract.LiveCourseMsg} LiveCourseMsg instance
             */
            LiveCourseMsg.create = function create(properties) {
                return new LiveCourseMsg(properties);
            };

            /**
             * Encodes the specified LiveCourseMsg message. Does not implicitly {@link ougd.OugdContract.LiveCourseMsg.verify|verify} messages.
             * @function encode
             * @memberof ougd.OugdContract.LiveCourseMsg
             * @static
             * @param {ougd.OugdContract.ILiveCourseMsg} message LiveCourseMsg message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LiveCourseMsg.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.liveCourseId);
                if (message.content != null && message.hasOwnProperty("content"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.content);
                if (message.nickName != null && message.hasOwnProperty("nickName"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.nickName);
                return writer;
            };

            /**
             * Encodes the specified LiveCourseMsg message, length delimited. Does not implicitly {@link ougd.OugdContract.LiveCourseMsg.verify|verify} messages.
             * @function encodeDelimited
             * @memberof ougd.OugdContract.LiveCourseMsg
             * @static
             * @param {ougd.OugdContract.ILiveCourseMsg} message LiveCourseMsg message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LiveCourseMsg.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a LiveCourseMsg message from the specified reader or buffer.
             * @function decode
             * @memberof ougd.OugdContract.LiveCourseMsg
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {ougd.OugdContract.LiveCourseMsg} LiveCourseMsg
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LiveCourseMsg.decode = function decode(reader, length) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ougd.OugdContract.LiveCourseMsg();
                while (reader.pos < end) {
                    let tag = reader.uint32();
                    switch (tag >>> 3) {
                    case 1:
                        message.liveCourseId = reader.string();
                        break;
                    case 2:
                        message.content = reader.string();
                        break;
                    case 3:
                        message.nickName = reader.string();
                        break;
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a LiveCourseMsg message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof ougd.OugdContract.LiveCourseMsg
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {ougd.OugdContract.LiveCourseMsg} LiveCourseMsg
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LiveCourseMsg.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a LiveCourseMsg message.
             * @function verify
             * @memberof ougd.OugdContract.LiveCourseMsg
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LiveCourseMsg.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    if (!$util.isString(message.liveCourseId))
                        return "liveCourseId: string expected";
                if (message.content != null && message.hasOwnProperty("content"))
                    if (!$util.isString(message.content))
                        return "content: string expected";
                if (message.nickName != null && message.hasOwnProperty("nickName"))
                    if (!$util.isString(message.nickName))
                        return "nickName: string expected";
                return null;
            };

            /**
             * Creates a LiveCourseMsg message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof ougd.OugdContract.LiveCourseMsg
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {ougd.OugdContract.LiveCourseMsg} LiveCourseMsg
             */
            LiveCourseMsg.fromObject = function fromObject(object) {
                if (object instanceof $root.ougd.OugdContract.LiveCourseMsg)
                    return object;
                let message = new $root.ougd.OugdContract.LiveCourseMsg();
                if (object.liveCourseId != null)
                    message.liveCourseId = String(object.liveCourseId);
                if (object.content != null)
                    message.content = String(object.content);
                if (object.nickName != null)
                    message.nickName = String(object.nickName);
                return message;
            };

            /**
             * Creates a plain object from a LiveCourseMsg message. Also converts values to other types if specified.
             * @function toObject
             * @memberof ougd.OugdContract.LiveCourseMsg
             * @static
             * @param {ougd.OugdContract.LiveCourseMsg} message LiveCourseMsg
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LiveCourseMsg.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                let object = {};
                if (options.defaults) {
                    object.liveCourseId = "";
                    object.content = "";
                    object.nickName = "";
                }
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    object.liveCourseId = message.liveCourseId;
                if (message.content != null && message.hasOwnProperty("content"))
                    object.content = message.content;
                if (message.nickName != null && message.hasOwnProperty("nickName"))
                    object.nickName = message.nickName;
                return object;
            };

            /**
             * Converts this LiveCourseMsg to JSON.
             * @function toJSON
             * @memberof ougd.OugdContract.LiveCourseMsg
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            LiveCourseMsg.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            return LiveCourseMsg;
        })();

        OugdContract.LiveCoursePlayState = (function() {

            /**
             * Properties of a LiveCoursePlayState.
             * @memberof ougd.OugdContract
             * @interface ILiveCoursePlayState
             * @property {string|null} [liveCourseId] LiveCoursePlayState liveCourseId
             * @property {number|null} [playState] LiveCoursePlayState playState
             */

            /**
             * Constructs a new LiveCoursePlayState.
             * @memberof ougd.OugdContract
             * @classdesc Represents a LiveCoursePlayState.
             * @implements ILiveCoursePlayState
             * @constructor
             * @param {ougd.OugdContract.ILiveCoursePlayState=} [properties] Properties to set
             */
            function LiveCoursePlayState(properties) {
                if (properties)
                    for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * LiveCoursePlayState liveCourseId.
             * @member {string} liveCourseId
             * @memberof ougd.OugdContract.LiveCoursePlayState
             * @instance
             */
            LiveCoursePlayState.prototype.liveCourseId = "";

            /**
             * LiveCoursePlayState playState.
             * @member {number} playState
             * @memberof ougd.OugdContract.LiveCoursePlayState
             * @instance
             */
            LiveCoursePlayState.prototype.playState = 0;

            /**
             * Creates a new LiveCoursePlayState instance using the specified properties.
             * @function create
             * @memberof ougd.OugdContract.LiveCoursePlayState
             * @static
             * @param {ougd.OugdContract.ILiveCoursePlayState=} [properties] Properties to set
             * @returns {ougd.OugdContract.LiveCoursePlayState} LiveCoursePlayState instance
             */
            LiveCoursePlayState.create = function create(properties) {
                return new LiveCoursePlayState(properties);
            };

            /**
             * Encodes the specified LiveCoursePlayState message. Does not implicitly {@link ougd.OugdContract.LiveCoursePlayState.verify|verify} messages.
             * @function encode
             * @memberof ougd.OugdContract.LiveCoursePlayState
             * @static
             * @param {ougd.OugdContract.ILiveCoursePlayState} message LiveCoursePlayState message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LiveCoursePlayState.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.liveCourseId);
                if (message.playState != null && message.hasOwnProperty("playState"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.playState);
                return writer;
            };

            /**
             * Encodes the specified LiveCoursePlayState message, length delimited. Does not implicitly {@link ougd.OugdContract.LiveCoursePlayState.verify|verify} messages.
             * @function encodeDelimited
             * @memberof ougd.OugdContract.LiveCoursePlayState
             * @static
             * @param {ougd.OugdContract.ILiveCoursePlayState} message LiveCoursePlayState message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LiveCoursePlayState.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a LiveCoursePlayState message from the specified reader or buffer.
             * @function decode
             * @memberof ougd.OugdContract.LiveCoursePlayState
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {ougd.OugdContract.LiveCoursePlayState} LiveCoursePlayState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LiveCoursePlayState.decode = function decode(reader, length) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ougd.OugdContract.LiveCoursePlayState();
                while (reader.pos < end) {
                    let tag = reader.uint32();
                    switch (tag >>> 3) {
                    case 1:
                        message.liveCourseId = reader.string();
                        break;
                    case 2:
                        message.playState = reader.int32();
                        break;
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a LiveCoursePlayState message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof ougd.OugdContract.LiveCoursePlayState
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {ougd.OugdContract.LiveCoursePlayState} LiveCoursePlayState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LiveCoursePlayState.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a LiveCoursePlayState message.
             * @function verify
             * @memberof ougd.OugdContract.LiveCoursePlayState
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LiveCoursePlayState.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    if (!$util.isString(message.liveCourseId))
                        return "liveCourseId: string expected";
                if (message.playState != null && message.hasOwnProperty("playState"))
                    if (!$util.isInteger(message.playState))
                        return "playState: integer expected";
                return null;
            };

            /**
             * Creates a LiveCoursePlayState message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof ougd.OugdContract.LiveCoursePlayState
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {ougd.OugdContract.LiveCoursePlayState} LiveCoursePlayState
             */
            LiveCoursePlayState.fromObject = function fromObject(object) {
                if (object instanceof $root.ougd.OugdContract.LiveCoursePlayState)
                    return object;
                let message = new $root.ougd.OugdContract.LiveCoursePlayState();
                if (object.liveCourseId != null)
                    message.liveCourseId = String(object.liveCourseId);
                if (object.playState != null)
                    message.playState = object.playState | 0;
                return message;
            };

            /**
             * Creates a plain object from a LiveCoursePlayState message. Also converts values to other types if specified.
             * @function toObject
             * @memberof ougd.OugdContract.LiveCoursePlayState
             * @static
             * @param {ougd.OugdContract.LiveCoursePlayState} message LiveCoursePlayState
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LiveCoursePlayState.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                let object = {};
                if (options.defaults) {
                    object.liveCourseId = "";
                    object.playState = 0;
                }
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    object.liveCourseId = message.liveCourseId;
                if (message.playState != null && message.hasOwnProperty("playState"))
                    object.playState = message.playState;
                return object;
            };

            /**
             * Converts this LiveCoursePlayState to JSON.
             * @function toJSON
             * @memberof ougd.OugdContract.LiveCoursePlayState
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            LiveCoursePlayState.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            return LiveCoursePlayState;
        })();

        OugdContract.LiveCourseSignCount = (function() {

            /**
             * Properties of a LiveCourseSignCount.
             * @memberof ougd.OugdContract
             * @interface ILiveCourseSignCount
             * @property {string|null} [liveCourseId] LiveCourseSignCount liveCourseId
             * @property {number|null} [signCount] LiveCourseSignCount signCount
             */

            /**
             * Constructs a new LiveCourseSignCount.
             * @memberof ougd.OugdContract
             * @classdesc Represents a LiveCourseSignCount.
             * @implements ILiveCourseSignCount
             * @constructor
             * @param {ougd.OugdContract.ILiveCourseSignCount=} [properties] Properties to set
             */
            function LiveCourseSignCount(properties) {
                if (properties)
                    for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * LiveCourseSignCount liveCourseId.
             * @member {string} liveCourseId
             * @memberof ougd.OugdContract.LiveCourseSignCount
             * @instance
             */
            LiveCourseSignCount.prototype.liveCourseId = "";

            /**
             * LiveCourseSignCount signCount.
             * @member {number} signCount
             * @memberof ougd.OugdContract.LiveCourseSignCount
             * @instance
             */
            LiveCourseSignCount.prototype.signCount = 0;

            /**
             * Creates a new LiveCourseSignCount instance using the specified properties.
             * @function create
             * @memberof ougd.OugdContract.LiveCourseSignCount
             * @static
             * @param {ougd.OugdContract.ILiveCourseSignCount=} [properties] Properties to set
             * @returns {ougd.OugdContract.LiveCourseSignCount} LiveCourseSignCount instance
             */
            LiveCourseSignCount.create = function create(properties) {
                return new LiveCourseSignCount(properties);
            };

            /**
             * Encodes the specified LiveCourseSignCount message. Does not implicitly {@link ougd.OugdContract.LiveCourseSignCount.verify|verify} messages.
             * @function encode
             * @memberof ougd.OugdContract.LiveCourseSignCount
             * @static
             * @param {ougd.OugdContract.ILiveCourseSignCount} message LiveCourseSignCount message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LiveCourseSignCount.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.liveCourseId);
                if (message.signCount != null && message.hasOwnProperty("signCount"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.signCount);
                return writer;
            };

            /**
             * Encodes the specified LiveCourseSignCount message, length delimited. Does not implicitly {@link ougd.OugdContract.LiveCourseSignCount.verify|verify} messages.
             * @function encodeDelimited
             * @memberof ougd.OugdContract.LiveCourseSignCount
             * @static
             * @param {ougd.OugdContract.ILiveCourseSignCount} message LiveCourseSignCount message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LiveCourseSignCount.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a LiveCourseSignCount message from the specified reader or buffer.
             * @function decode
             * @memberof ougd.OugdContract.LiveCourseSignCount
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {ougd.OugdContract.LiveCourseSignCount} LiveCourseSignCount
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LiveCourseSignCount.decode = function decode(reader, length) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ougd.OugdContract.LiveCourseSignCount();
                while (reader.pos < end) {
                    let tag = reader.uint32();
                    switch (tag >>> 3) {
                    case 1:
                        message.liveCourseId = reader.string();
                        break;
                    case 2:
                        message.signCount = reader.int32();
                        break;
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a LiveCourseSignCount message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof ougd.OugdContract.LiveCourseSignCount
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {ougd.OugdContract.LiveCourseSignCount} LiveCourseSignCount
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LiveCourseSignCount.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a LiveCourseSignCount message.
             * @function verify
             * @memberof ougd.OugdContract.LiveCourseSignCount
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LiveCourseSignCount.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    if (!$util.isString(message.liveCourseId))
                        return "liveCourseId: string expected";
                if (message.signCount != null && message.hasOwnProperty("signCount"))
                    if (!$util.isInteger(message.signCount))
                        return "signCount: integer expected";
                return null;
            };

            /**
             * Creates a LiveCourseSignCount message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof ougd.OugdContract.LiveCourseSignCount
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {ougd.OugdContract.LiveCourseSignCount} LiveCourseSignCount
             */
            LiveCourseSignCount.fromObject = function fromObject(object) {
                if (object instanceof $root.ougd.OugdContract.LiveCourseSignCount)
                    return object;
                let message = new $root.ougd.OugdContract.LiveCourseSignCount();
                if (object.liveCourseId != null)
                    message.liveCourseId = String(object.liveCourseId);
                if (object.signCount != null)
                    message.signCount = object.signCount | 0;
                return message;
            };

            /**
             * Creates a plain object from a LiveCourseSignCount message. Also converts values to other types if specified.
             * @function toObject
             * @memberof ougd.OugdContract.LiveCourseSignCount
             * @static
             * @param {ougd.OugdContract.LiveCourseSignCount} message LiveCourseSignCount
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LiveCourseSignCount.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                let object = {};
                if (options.defaults) {
                    object.liveCourseId = "";
                    object.signCount = 0;
                }
                if (message.liveCourseId != null && message.hasOwnProperty("liveCourseId"))
                    object.liveCourseId = message.liveCourseId;
                if (message.signCount != null && message.hasOwnProperty("signCount"))
                    object.signCount = message.signCount;
                return object;
            };

            /**
             * Converts this LiveCourseSignCount to JSON.
             * @function toJSON
             * @memberof ougd.OugdContract.LiveCourseSignCount
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            LiveCourseSignCount.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            return LiveCourseSignCount;
        })();

        return OugdContract;
    })();

    return ougd;
})();

export { $root as default };
